page.tsx 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import React from "react";
  2. import { getServerUrl } from "@/shared/lib/server-url";
  3. import { SiteConfig } from "@/shared/config/site-config";
  4. import { WorkoutStepper } from "@/features/workout-builder";
  5. import type { Metadata } from "next";
  6. export async function generateMetadata({ params }: { params: Promise<{ locale: string }> }): Promise<Metadata> {
  7. const { locale } = await params;
  8. const isEnglish = locale === "en";
  9. const title = isEnglish ? "Build Your Perfect Workout" : "Créez Votre Entraînement Parfait";
  10. const description = isEnglish
  11. ? "Create free workout routines with our comprehensive exercise database. Track your progress and achieve your fitness goals. 🏋️"
  12. : "Créez des routines d'entraînement gratuites avec notre base de données d'exercices complète. Suivez vos progrès et atteignez vos objectifs fitness. 🏋️";
  13. return {
  14. title,
  15. description,
  16. keywords: isEnglish
  17. ? ["workout builder", "exercise planner", "fitness routine", "personalized training", "muscle targeting", "free workout"]
  18. : [
  19. "créateur d'entraînement",
  20. "planificateur d'exercices",
  21. "routine fitness",
  22. "entraînement personnalisé",
  23. "ciblage musculaire",
  24. "entraînement gratuit",
  25. ],
  26. openGraph: {
  27. title: `${title} | ${SiteConfig.title}`,
  28. description,
  29. images: [
  30. {
  31. url: `${getServerUrl()}/images/default-og-image_${locale}.jpg`,
  32. width: SiteConfig.seo.ogImage.width,
  33. height: SiteConfig.seo.ogImage.height,
  34. alt: title,
  35. },
  36. ],
  37. },
  38. twitter: {
  39. title: `${title} | ${SiteConfig.title}`,
  40. description,
  41. images: [`${getServerUrl()}/images/default-og-image_${locale}.jpg`],
  42. },
  43. };
  44. }
  45. export default async function HomePage() {
  46. return (
  47. <div className="bg-background text-foreground relative flex flex-col h-full">
  48. <WorkoutStepper />
  49. </div>
  50. );
  51. }